import {makeAutoObservable} from "mobx";
import {useState} from "react";

class Store {
    constructor() {
        makeAutoObservable(this);
    }
    //商品详情id
    dataId=""
    //商家id
    sid=""
    //后端返回的用户数据，id在这里面
    userData={};
    // height=true
    userPhone=""
    token=""
    //微信用户信息
    //nickName
    userInformation={}
    newData=[]
    selectedData=[]
    hotGoods=[]
    historyGoods=[]
    selectNoneData=[]
    firstType={}
    //足迹跳转详情数据
    footdata={}
    //售后详情数据
    orderXQ=[]
    orderInformation={}
    setOrderInformation= (val) => {
        this.orderInformation = val;
    };
    setSid= (val) => {
        this.sid = val;
    };
    setFirstType= (val) => {
        this.firstType = val;
    };
    setHotGoods= (val) => {
        this.hotGoods = val;
    };
    setSelectNoneData= (val) => {
        this.selectNoneData = val;
    };
    setDataId= (val) => {
        this.dataId = val;
    };
    setHistoryGoods= (val) => {
        this.historyGoods = val;
    };
    setSelectedData= (val) => {
        this.selectedData = val;
    };
    setUserData = (val) => {
        this.userData = val;
    };
    setNewData = (val) => {
        this.newData = val;
    };
    setUserPhone = (val) => {
        this.userPhone = val;
    };
    setToken = (val) => {
        this.token = val;
    };
    setUserInformation = (val) => {
        this.userInformation = val;
    };
    //足迹跳转
    setXiangqingData=(val)=>{
        this.footdata=val
    }
    //售后订单数据跳转到详情页
    setoderData=(val)=>{

    }
}

let store = new Store();
export default store;
